package com.ruandi.homework;

import com.ruandi.bean.Rectangle;

import java.math.BigDecimal;

public class Test2 {
    public static void main(String[] args) {
        Rectangle rectangle = new Rectangle();
        rectangle.setLength(new BigDecimal("100"));
        rectangle.setWidth(new BigDecimal("50"));
        System.out.println("长：" + rectangle.getLength());
        System.out.println("宽：" + rectangle.getWidth());
        System.out.println("面积：" + rectangle.getArea());
        System.out.println("周长：" + rectangle.getPerimeter());
        rectangle.setLength(new BigDecimal("200"));
        rectangle.setWidth(new BigDecimal("100"));
        rectangle.getInfo();
        //r.setLength(r.getLength()*2);
        //		r.setWidth(r.getWidth()*2);
        //		System.out.println(r.getInfo());
    }
}
